<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript">
function checkInput() {
	if ( $("input[name=subject]").val() == "" ) {
		alert("제목을 입력하세요.");
		return false;
	} else if ( $("textarea[name=content]").val() == "" ) {
		alert("약관 내용을 입력하세요.");
		return false;
	}
	return true;
}
</script>

</head>
<body>

<h2>약관 등록</h2>
<form action="regTerms.ga" method="post" onsubmit="return checkInput()">
&nbsp; 항목: &nbsp;
<input type="radio" name="terms_type" value="0" checked/> 개인보호정책 &nbsp;
<input type="radio" name="terms_type" value="1"/> 서비스 이용 약관

<br/><br/>

&nbsp; 제목: &nbsp; <input type="text" name="subject" style="width:60%"/>
<br/><br/><br/>

&nbsp; 내용
<br/>
<textarea name="content" rows="20" cols="100" style="resize:none;width:100%;"></textarea>
&nbsp; 변경 내용 한줄 요약
<br/>
<textarea name="summary" rows="3" cols="100" style="resize:none;width:100%"></textarea>

<table width="100%">
    <tr>
        <td align="right">
            <input type="button" value="취소" style="width:100px;height:30px;" onclick="location.href='./termsList.ga'"/>
            <input type="submit" value="등록하기" style="width:100px;height:30px;"/>
        </td>
    </tr>
</table>
</form>

</body>
</html>